function R = convertUnitQuaternion2RotationMatrix(e)

    e0 = e(1);
    e1 = e(2);
    e2 = e(3);
    e3 = e(4);

    r11 = 1-2*(e2^2+e3^2);
    r12 = 2*(e1*e2-e0*e3);
    r13 = 2*(e1*e3+e0*e2);
    
    r21 = 2*(e1*e2+e0*e3);
    r22 = 1-2*(e1^2+e3^2);
    r23 = 2*(e2*e3-e0*e1);
    
    r31 = 2*(e1*e3-e0*e2);
    r32 = 2*(e2*e3+e0*e1);
    r33 = 1-2*(e1^2+e2^2);
    
    R = [ r11 r12 r13 ;
          r21 r22 r23 ;
          r31 r32 r33 ];